// 库存管理接口
import request from "@/common/request.js";
const api = {
  unit: "/unit/",
};

const daUnitApi = {
  get_unit(params) {
    return request({
      url: api.unit,
      method: "get",
      params,
    });
  },

  unit_detail(id) {
    return request({
      url: api.unit + id,
      method: "get",
    });
  },

  post_unit(data) {
    return request({
      url: api.unit,
      method: "post",
      data,
    });
  },

  patch_unit(data, id) {
    return request({
      url: api.unit + id + "/",
      method: "patch",
      data,
    });
  },

  delete_unit(id) {
    return request({
      url: api.unit + id + "/",
      method: "delete",
    });
  },
};
export default daUnitApi;
